import axios from 'axios';
import { ORDER_DATA, CHANGE_LOADING_STATUS } from '../types/orderType';


export const getOrderData = () => (dispatch) => {
  axios({
    method: 'get',
    url: './static/json/orders.json',
  }).then((res) => {
    dispatch({
      type: ORDER_DATA,
      data: res.data.data.digestlist,
    });
  });
};

export const changeLoadingStatus = status => ({
  type: CHANGE_LOADING_STATUS,
  data: status,
});
